﻿@model S4Store.Models.AfterSaleCarKPI.AfterSaleCarTypeListModel
@{
    ViewBag.Title = "InputCarKpiMonthConfig";
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
    Layout = null;
}
@{int i = 0;}
<form class="pageForm addpage" action="@Url.Action("ModifyBackInputAfterSaleCarTypeKpiMonthConfig")" method="post">
<div style="height: 100%; width: 100%; overflow: hidden" class="verticalSplitContainer">
    <div style="overflow: auto;" ratio="#130">
<table  class="rpttable"  style="border-collapse:collapse;">
            <tr height="90"  class="vtr">
                <th class="yellow" ><div class="wd60 pd510"><div class="wd20">车型</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">应实施5K保养数</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">应实施10K保养数</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">事故车入厂台次目标</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">维修入厂台次目标</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">5K保养目标产值(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">10K保养目标产值(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">事故车产值目标(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">维修产值目标(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">首次续保台次目标</div></div>
                </th>
                <th class="yellow" ><div class="wd40 pd510"><div class="wd20">二次续保台次目标</div></div>
                </th>
            </tr>
      	</table>
     </div>
<div class="" style="overflow: auto;" ratio="*">
 <table  class="rpttable"  style="border-collapse:collapse;">
            @foreach (var brand in Model.CarBrands)
            {
                var item = Model.AfterSaleCarModelMonthConfigs.Where(o => o.CarBrandId == brand.Id).FirstOrDefault();
                if (item == null)
                {
                    item = new S4Store.Domain.AfterSaleKpi.AfterSaleCarTypeMonthConfig();
                }
                <tr>
                    <td><div class="wd60 pd510">@brand.Name<input type="hidden" name="afterSaleCarlist[@i].CarBrandId" value="@brand.Id" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYYSS5KBYS_MonthTarget5K" value="@item.BYYSS5KBYS_MonthTarget5K" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYYSS10KBYS_MonthTarget10k" value="@item.BYYSS10KBYS_MonthTarget10k" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYSGCRCTCMB_MonthAacidentCarToFactoryTarget" value="@item.BYSGCRCTCMB_MonthAacidentCarToFactoryTarget" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYWXRCTCMB_MonthMaintainCarToFactoryTarget" value="@item.BYWXRCTCMB_MonthMaintainCarToFactoryTarget" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].WQBYMBCZ_5KMaintenanceTargetValue" value="@item.WQBYMBCZ_5KMaintenanceTargetValue" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].SQBYMBCZ_TenKMaintenanceTargetValue" value="@item.SQBYMBCZ_TenKMaintenanceTargetValue" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYSGCCZBM_MonthAacidentCarTargetValue" value="@item.BYSGCCZBM_MonthAacidentCarTargetValue" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].BYWXCZMB_MonthMaintenanceTargetValue" value="@item.BYWXCZMB_MonthMaintenanceTargetValue" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].SCXBTCMB_FirstRenewTarget" value="@item.SCXBTCMB_FirstRenewTarget" /></div>
                    </td>
                    <td><div class="wd40 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarlist[@i].ECXBTCMB_SecondRenewTarget" value="@item.ECXBTCMB_SecondRenewTarget" /></div>
                    </td>
                </tr>
                                                                                                                                  i++;
            }
        </table>
    </div>
    <input type="hidden" name="y" value="@Model.Date.Year" /> <input type="hidden" name="m" value="@Model.Date.Month" />

    <div class="formBar" ratio="#30">
     @if (!Model.isconfirmed || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
    {
        <ul>
            <li>
                <div class="simplebutton">
                    <div class="r">
                        <button type="button" class="submit">
                            保存</button></div>
                </div>
            </li>
            <li>确认数据：<input type="checkbox" name="isconfirm" value="true" /></li>
        </ul>
    }
    </div>
</form>
